Warn if the icon cannot be loaded. (#323504, Kjartan Maraas)
authorMatthias Clasen <mclasen@redhat.com>
Wed, 14 Dec 2005 19:14:14 +0000 (19:14 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 14 Dec 2005 19:14:14 +0000 (19:14 +0000)
2005-12-14  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon
cannot be loaded.  (#323504, Kjartan Maraas)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkdnd.c

index 8f93318ec2c51f4b7140473c2d5aeace4244f76f..fd913b6e6ee1481b36c6b56b5e34de97bd4c455f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-12-14  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon
+       cannot be loaded.  (#323504, Kjartan Maraas)
+
        * gtk/gtktreeview.c (gtk_tree_view_class_init): Add docs 
        for the row-activated signal.  (#324044, Davyd Madeley)
 
index 8f93318ec2c51f4b7140473c2d5aeace4244f76f..fd913b6e6ee1481b36c6b56b5e34de97bd4c455f 100644 (file)
@@ -1,5 +1,8 @@
 2005-12-14  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkdnd.c (gtk_drag_set_icon_name): Warn if the icon
+       cannot be loaded.  (#323504, Kjartan Maraas)
+
        * gtk/gtktreeview.c (gtk_tree_view_class_init): Add docs 
        for the row-activated signal.  (#324044, Davyd Madeley)
 
index 24b6f51211f0628cc8a3f761e2696e08125af1a9..9caa1a711abc1fb22c9eb31a28f27d2a8aea8a71 100644 (file)
@@ -3050,7 +3050,10 @@ gtk_drag_set_icon_name (GdkDragContext *context,
 
   pixbuf = gtk_icon_theme_load_icon (icon_theme, icon_name,
                                     icon_size, 0, NULL);
-  set_icon_stock_pixbuf (context, NULL, pixbuf, hot_x, hot_y, FALSE);
+  if (pixbuf)
+    set_icon_stock_pixbuf (context, NULL, pixbuf, hot_x, hot_y, FALSE);
+  else
+    g_warning ("Cannot load drag icon from icon name %s", icon_name);
 }
 
 /**